<?php
extract ($data);
$span_class = (isset($selectedCategoryID) && $StoreCategory['id'] == $selectedCategoryID ) ? 'active' : 'off';
//$tree->addItemAttribute('class', $span_class); // highlight this li
echo $html->link($StoreCategory['name'], array('plugin'=>'store','controller'=>'products','action' => 'display', $StoreCategory['id'],Inflector::slug($StoreCategory['name'],'-')),array('escape'=>false,'class'=>$span_class));